// Wrapper around QUdpSocket adding multicast actions
// like join and leave
#ifndef MULTICASTSOCKET_H
#define MULTICASTSOCKET_H

#include <QUdpSocket>



class MulticastSocket : public QUdpSocket
{
	public:
		MulticastSocket(QObject *parent = 0);

    		~MulticastSocket();

		int enableLoopback();
		int disableLoopback();
		//by default TTL is set to ? and we want packets
		//not to go uot from our LAN
		int setTTL(int);
		
		/*
		Takes a QHost address and tries to call
		setsockopt to join the group provided 
		*/

		int join(QHostAddress);
		
		/* 
		Leaves the group
		*/
		int leave(QHostAddress);

};

#endif
